import { Banner } from '@libs/db/models/banner.model';
import { Controller } from '@nestjs/common';
import { ApiTags } from '@nestjs/swagger';
import { ReturnModelType } from '@typegoose/typegoose';
import { Crud } from 'nestjs-mongoose-crud';
import { InjectModel } from 'nestjs-typegoose';

@Crud({
    model: Banner,
    routes: {
        create: false,
        update: false,
        delete: false 
     }
})
@Controller('banners')
@ApiTags('横幅')
export class BannersController {
    constructor(
        @InjectModel(Banner) private readonly model: ReturnModelType<typeof Banner>
    ){}
}
